Skip to content

chore: remove small dead leftovers - #14293

Merged
marius-kilocode merged 1 commit into
mainfrom
chore/remove-small-leftovers
Sep 18, 2026
Merged

marius-kilocode merged 1 commit into
mainfrom
chore/remove-small-leftovers

Conversation

@marius-kilocode

Copy link
Copy Markdown
Collaborator

Removes three pieces of dead code found during a cleanup pass. The diff is net negative (14 insertions, 52 deletions).

Changes

  • Mermaid default labels: packages/ui/src/kilocode/mermaid/markdown-mermaid.ts had a hardcoded English labels object and a mergeLabels fallback. The only caller (packages/ui/src/components/markdown.tsx) always builds a complete MermaidLabels from i18n keys, so every default was shadowed. Removed the default and mergeLabels; renderMermaid now takes the caller's labels directly. renderMermaid is not exported from any public entry.
  • Duplicate Mermaid story: packages/ui/src/kilocode/mermaid/markdown-mermaid.stories.tsx exported a Mermaid story that duplicates the MarkdownMermaid story in packages/kilo-vscode/webview-ui/src/stories/shared.stories.tsx, which the same Storybook loads. Removed only the duplicate export; MermaidError and MermaidThemes remain.
  • Rename-only alias: packages/kilo-vscode/webview-ui/src/components/chat/background-agents.ts exported children as a pass-through to the private taskChildren. Exported taskChildren directly and updated the importers (ChatView.tsx, SubagentPanel.tsx, and the unit test) rather than keeping an alias.

No behavior change. No new helpers or tests.

Evidence

  • bun run --cwd packages/kilo-vscode lint passes.
  • bun test tests/unit/background-agents.test.ts from packages/kilo-vscode: 24 pass.
  • bun test src/kilocode/mermaid from packages/ui: mermaid tests pass. The markdown-bidi.test.ts case fails on a pre-existing unbuilt @opencode-ai/core module, unrelated to this change.
  • bun run --cwd packages/kilo-vscode typecheck and packages/ui typecheck report only pre-existing environment errors (unbuilt workspace packages and stale SDK in node_modules), none in touched files.

@kilo-code-bot

kilo-code-bot Bot commented Sep 18, 2026 •

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (6 files)
  • packages/kilo-vscode/tests/unit/background-agents.test.ts
  • packages/kilo-vscode/webview-ui/agent-manager/SubagentPanel.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/ChatView.tsx
  • packages/kilo-vscode/webview-ui/src/components/chat/background-agents.ts
  • packages/ui/src/kilocode/mermaid/markdown-mermaid.stories.tsx
  • packages/ui/src/kilocode/mermaid/markdown-mermaid.ts

Verified the removals are genuinely dead: renderMermaid's only caller (packages/ui/src/components/markdown.tsx:567) builds a complete MermaidLabels from i18n keys, the renamed taskChildren has all importers updated (no remaining children references from background-agents), and the dropped Storybook Mermaid story is not referenced by the visual-regression spec, which targets shared--markdown-mermaid. No changes touch shared upstream opencode files.


Reviewed by deepseek-v4.1-flash · Input: 0 · Output: 0 · Cached: 0

Review guidance: REVIEW.md from base branch main

@marius-kilocode
marius-kilocode merged commit a67babd into main Sep 18, 2026
33 checks passed
@marius-kilocode
marius-kilocode deleted the chore/remove-small-leftovers branch September 18, 2026 13:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants